import os

# 修改为镜像源
os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com'

from huggingface_hub import snapshot_download

snapshot_download(
    repo_id="Qwen/Qwen1.5-32B-Chat",  # 库name,网页查看
    repo_type="model",  # 模型=model， 数据集=dataset
    local_dir="/home/luban/cache1/llm/Qwen1.5-32B-Chat",  # 本地存储目录
    allow_patterns=['*'],
    local_dir_use_symlinks=False,
    resume_download=True,
    #   proxies={"https": "http://localhost:7890"}, # clash default port
    max_workers=8
)
